package com.zidongxiangxi.rabbit.producer.mapper;

import com.zidongxiangxi.rabbit.producer.entity.ProducerSequence;
import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * rabbitMQ顺序发送记录表
 *
 * @author chenxudong
 * @date 2020/11/07
 */
public class ProducerSequenceMapper implements RowMapper<ProducerSequence> {
	@Override
	public ProducerSequence mapRow(ResultSet rs, int rowNum) throws SQLException {
		ProducerSequence message = new ProducerSequence();
		message.setId(rs.getLong("id"));
		message.setApplication(rs.getString("application"));
		message.setGroupName(rs.getString("group_name"));
		message.setMessageId(rs.getString("message_id"));
		message.setCreateTime(rs.getDate("create_time"));
		return message;	}
}
